package net.sasuke.firstapp.tags;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;
import javax.servlet.jsp.tagext.SimpleTagSupport;

public class CookieTagHandler extends SimpleTagSupport {

   private String user;
   
   public String getUser() {
      return user;
   }

   public void setUser(String user) {
      this.user = user;
   }

   @Override
   public void doTag() throws JspException, IOException {
      getJspContext().getOut().println("<p>Hello " + getUser() + "! Take a cookie. :-)</p>");
      getJspBody().invoke(null);
   }

}

class MyClassicTag extends BodyTagSupport {

   @Override
   public void doInitBody() throws JspException {
      super.doInitBody();
   }
   
}

